#region Using References

using Beaker.Services.Locator;
using GalaSoft.MvvmLight.Messaging;

#endregion

namespace Beaker.OpenCube.WorldViewer.Messages
{
	public static class MessageExtensions
	{

		/// <summary>
		/// Sends the specified message using the default messenger
		/// </summary>
		/// <param name="message">The message to send.</param>
		public static void Send<TMessage>( this TMessage message )
			where TMessage: MessageBase
		{
			var messenger = ServiceLocator.Current.GetInstance<IMessenger>();
			messenger.Send( message );
		}

	}
}